/* $Id: f_pid.c,v 1.3 2004/11/16 17:55:54 sby Exp $ */

#include "dao.h"
#include <fcntl.h>

void
f_pid(const char *buf)
{
  FILE *fp;

  if ((fp = fopen(buf, "w")) != NULL)
  {
    fprintf (fp, "%d\n", getpid());
    fclose(fp);
  }
  else
  {
    fprintf(stderr, "can not log PID file [%s]\n", buf);
    exit(-1);
  }
}

